import Vue from 'vue'
import Vuex from 'vuex'


Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    loginname: '',
    accesstoken: '',
    token: ''
  },
  getters: {
    getLoginname: state => state.loginname,
    getAccesstoken: state => state.accesstoken,
    getToken: state => state.token
  },
  mutations: {
    setLoginname: (state, name) => state.loginname = name,
    setAccesstoken: (state, token) => state.accesstoken = token,
    setToken: (state, token) => state.token = token
  },
  actions: {},

  modules: {}
})

export default store
